<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid"%>
<%@ page import="com.rcm.model.*"%>
<rapid:override name="head">
	<title>选课结果</title>
</rapid:override>
<rapid:override name="content">
	<%
		String path = request.getContextPath();
			String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
	%>

	<body style="height: 100%; margin: 0px">
		<div id="container" style="height: 80%"></div>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts-gl/dist/echarts-gl.min.js"></script>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts-stat/dist/ecStat.min.js"></script>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts/dist/extension/dataTool.min.js"></script>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts/map/js/china.js"></script>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js"></script>
		<script type="text/javascript"
			src="https://cdn.jsdelivr.net/npm/echarts/dist/extension/bmap.min.js"></script>
			 <script src="${pageContext.request.contextPath}/js/jquery.js"></script>
		<script type="text/javascript">
		
		//提交判断验证码

		$(function() {
					$.ajax({
						type: "post",
						url: "Teacherinfocontroller/courstatistics",
						success: function(data) {
						
						//字符串分割数组
						var arr=data.split(',')
					
							
							var dom = document.getElementById("container");
							var myChart = echarts.init(dom);
							var app = {};
							option = null;
							option = {
								color : new echarts.graphic.LinearGradient(0, 0, 0, 1, [ {
									offset : 0,
									color : '#83bff6'
								}, {
									offset : 0.5,
									color : '#188df0'
								}, {
									offset : 1,
									color : '#188df0'
								} ]),
								tooltip : {
									trigger : 'axis',
									axisPointer : { // 坐标轴指示器，坐标轴触发有效
										type : 'shadow' // 默认为直线，可选为：'line' | 'shadow'
									}
								},
								grid : {
									left : '3%',
									right : '4%',
									bottom : '3%',
									containLabel : true
								},
								xAxis : [ {
									type : 'category',
									data : [ '语文', '数学', '外语', '物理', '历史', '生物', '地理', '化学',
											'政治' ],
									axisTick : {
										alignWithLabel : true
									}
								} ],
								yAxis : [ {
									type : 'value'
								} ],
								series : [ {
									name : '直接访问',
									type : 'bar',
									barWidth : '60%',
									data : arr
									
								} ]
							};

							if (option && typeof option === "object") {
								myChart.setOption(option, true);
							}
							
							
							
							
							
						},
					})	
				});

			
		</script>
	</body>
</rapid:override>
<!-- <script type="text/javascript">
	function goPage(num) {

		location.href = "http://localhost:8080/ElectiveSystem/Teacherinfocontroller/querycourses?pageNum="
				+ num;
	}
</script> -->
<%@ include file="baseteacher.jsp"%>
